package com.ntschy.web.controller.app;

import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ntschy.bt.entity.dataobject.BtSupplyShop;
import com.ntschy.bt.entity.dto.AppBtSupplyShopPageDTO;
import com.ntschy.bt.entity.dto.BtSupplyShopPageDTO;
import com.ntschy.bt.entity.mapstruct.BtSupplyShopMapstruct;
import com.ntschy.bt.service.IBtSupplyShopService;
import com.ntschy.common.core.AjaxPageResult;
import com.ntschy.common.core.AjaxResult;
import com.ntschy.common.core.controller.BaseController;
import com.ntschy.common.core.entity.dataobject.SysUser;
import com.ntschy.sys.entity.mapstruct.SysUserMapstruct;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@Api(tags = "app供需超市接口")
@RestController
@RequestMapping("/app/supplyShop")
public class AppBtSupplyShopController extends BaseController {

    @Autowired
    private IBtSupplyShopService supplyShopService;

    /**
     * 查询供需超市列表
     * @param pageDTO
     * @return
     */
    /*@ApiOperation(value = "获取供需超市信息", notes = "/api/selectSupplyShopList")
    @ApiResponses(@ApiResponse(code = 200, message = "查询成功" ))
    @PostMapping("/selectSupplyShopList")
    public AjaxPageResult<BtSupplyShop> selectSupplyShopList(@RequestBody AppBtSupplyShopPageDTO pageDTO) {
        Page<SysUser> page = PageHelper.startPage(pageDTO.getCurrPage(), pageDTO.getPageSize());
        BtSupplyShop supplyShop = BtSupplyShopMapstruct.BT_SUPPLY_SHOP_MAP_STRUCT.pageDtoToDo(pageDTO);
        List<BtSupplyShop> list = supplyShopService.pageSupplyShop(supplyShop);
        return buildPageResult(list, page);
    }*/


}
